home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 050 / madtrb34.arc / SOUND.PAS < prev    next >
Encoding:
Pascal/Delphi Source File  |  1986-04-25  |  640 b   |  24 lines

  1. { programs need not be complex to be fun............}
  2. program sound;
  3. var i        :integer;
  4.     response :char;
  5. begin
  6.  i := 15;
  7.  clrscr;
  8.  response := ' ';
  9.  gotoXY(1,9);
  10.  write('press + for higher, or - for lower, q to quit');
  11.  gotoXY(1,10);
  12.  write('frequency');
  13.  repeat
  14.   if keypressed then read(kbd,response);
  15.   if response = '-' then i := i-10;
  16.   if response = '+' then i := i+10;
  17.   sound(i);
  18.   gotoXY(15,10);
  19.   write(i,'     ');
  20.   delay(70);
  21.  until response = 'q';
  22.  for i := 20 to 5000 do sound(i);
  23.  nosound;
  24. end.